package com.ruoyi.system.domain;

import java.util.List;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntityPlus;

/**
 * 信息资讯对象 c_news
 * 
 * @author ruoyi
 * @date 2021-05-22
 */
public class CNews extends BaseEntityPlus
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @Excel(name = "主键ID")
    private Long id;

    /** 标题 */
    @Excel(name = "标题")
    private String title;

    /** 副标题 */
    @Excel(name = "副标题")
    private String subhead;

    /** 发布时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date releaseTime;

    /** 新闻内容 */
    @Excel(name = "新闻内容")
    private String newsContent;

    /** 状态 （0未发布 1已发布 2已删除） */
    @Excel(name = "状态 ", readConverterExp = "0=未发布,1=已发布,2=已删除")
    private Long newsStatus;

    /** 资讯分类 */
    @Excel(name = "资讯分类")
    private Long cateId;

    /** 点击量 */
    @Excel(name = "点击量")
    private Long clickCount;

    /** 图片，以,分隔 */
    @Excel(name = "图片，以,分隔")
    private String images;

    /** 资讯类别信息 */
    @TableField(exist = false)
    private List<CCategory> cCategoryList;

    //父级菜单名称
    @TableField(exist = false)
    private String subCateName;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }
    public void setSubhead(String subhead) 
    {
        this.subhead = subhead;
    }

    public String getSubhead() 
    {
        return subhead;
    }
    public void setReleaseTime(Date releaseTime) 
    {
        this.releaseTime = releaseTime;
    }

    public Date getReleaseTime() 
    {
        return releaseTime;
    }
    public void setNewsContent(String newsContent) 
    {
        this.newsContent = newsContent;
    }

    public String getNewsContent() 
    {
        return newsContent;
    }
    public void setNewsStatus(Long newsStatus) 
    {
        this.newsStatus = newsStatus;
    }

    public Long getNewsStatus() 
    {
        return newsStatus;
    }
    public void setCateId(Long cateId) 
    {
        this.cateId = cateId;
    }

    public Long getCateId() 
    {
        return cateId;
    }
    public void setClickCount(Long clickCount) 
    {
        this.clickCount = clickCount;
    }

    public Long getClickCount() 
    {
        return clickCount;
    }
    public void setImages(String images) 
    {
        this.images = images;
    }

    public String getImages() 
    {
        return images;
    }

    public List<CCategory> getCCategoryList()
    {
        return cCategoryList;
    }

    public void setCCategoryList(List<CCategory> cCategoryList)
    {
        this.cCategoryList = cCategoryList;
    }

    public String getSubCateName() {
        return subCateName;
    }

    public void setSubCateName(String subCateName) {
        this.subCateName = subCateName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("title", getTitle())
            .append("subhead", getSubhead())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("updateBy", getUpdateBy())
            .append("releaseTime", getReleaseTime())
            .append("newsContent", getNewsContent())
            .append("newsStatus", getNewsStatus())
            .append("cateId", getCateId())
            .append("clickCount", getClickCount())
            .append("images", getImages())
            .append("cCategoryList", getCCategoryList())
            .toString();
    }
}
